//
//  FirstViewController.m
//  soccer
//
//  Created by 上官千城 on 15/9/10.
//  Copyright (c) 2015年 上官千城. All rights reserved.
//

#import "FirstViewController.h"

@interface FirstViewController ()

@end

@implementation FirstViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    UITextField *userName = [[UITextField alloc]initWithFrame:CGRectMake(50, 150, WIDTH - 40, 30)];
    userName.borderStyle = UITextBorderStyleRoundedRect;
    [self.view addSubview:userName];
    
    UITextField *password1 = [[UITextField alloc]initWithFrame:CGRectMake(userName.frame.origin.x, userName.frame.origin.y + userName.frame.size.height + 30, userName.frame.size.width, userName.frame.size.height)];
    password1.borderStyle = UITextBorderStyleRoundedRect;
    password1.textColor = [UIColor whiteColor];
    password1.secureTextEntry = YES;
    [self.view addSubview:password1];
    
    UITextField *password2 = [[UITextField alloc]initWithFrame:CGRectMake(password1.frame.origin.x, password1.frame.origin.y + password1.frame.size.height + 30, password1.frame.size.width, password1.frame.size.height)];
    password2.borderStyle = UITextBorderStyleRoundedRect;
    password2.secureTextEntry = YES;
    [self.view addSubview:password2];
    
    
    UIButton *login = [UIButton buttonWithType:UIButtonTypeCustom];
    [login addTarget:self action:@selector(buttonAction) forControlEvents:UIControlEventTouchUpInside];
    login.frame = CGRectMake(password2.frame.origin.x + 20 , password2.frame.origin.y + password2.frame.size.height + 30, 60, 30);
    login.backgroundColor = [UIColor orangeColor];
    [self.view addSubview:login];
    
    UIButton *Registered = [UIButton buttonWithType:UIButtonTypeCustom];
    Registered.frame = CGRectMake(login.frame.origin.x + login.frame.size.width +20, login.frame.origin.y, login.frame.size.width, login.frame.size.height);
    [Registered addTarget:self action:@selector(registereAction) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:Registered];
}
//登陆
-(void)buttonAction
{
//    self.view1 = [[RESideMenu alloc]init];
    [self.myDelegate setRootViewController];
    ConsultViewController *view = [[ConsultViewController alloc]init];
    [self presentViewController:view animated:YES completion:^{
     self.view.window.rootViewController = view;   
        
    }];
    
}

//注册
-(void)registereAction
{
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
